<template>
  <CommonCard title="今日销售额" value="303,467,99">
    <div class="compare-wrap">
      <div class="compare">
        <span>日同比</span>
        <!-- 为了给字体设置颜色 -->
        <span class="emphasis">-19.16%</span>
        <!-- 箭头 -->
        <span class="decrement"></span>
      </div>
      <div class="compare">
        <span>月同比</span>
        <!-- 为了给字体设置颜色 -->
        <span class="emphasis">56.67%</span>
        <!-- 箭头 -->
        <span class="increment"></span>
      </div>
    </div>
    <!-- 分割线 -->
    <template #footer>
      <div class="footer">
        <span>昨日销售额</span>
        <span class="emphasis">￥ 360,000,00</span>
      </div>
    </template>
  </CommonCard>
</template>

<script lang="ts">
export default {
  name: "TodaySales",
};
</script>

<script lang="ts" setup>
import CommonCard from "./CommonCard.vue";
</script>
<style lang="scss" scoped>
.compare-wrap {
  font-size: 12px;
  height: 100%;
  font-weight: 700;
  color: #666;
  display: flex;
  flex-direction: column;
  .compare {
    display: flex;
    align-items: center;
    margin: 5px 0;
  }
}
</style>
